package routers

import (
	"shop/internal/handler"

	"github.com/gin-gonic/gin"
)

func init() {
	apiV1RouterFns = append(apiV1RouterFns, func(group *gin.RouterGroup) {
		tkGeneralizeRouter(group, handler.NewTkGeneralizeHandler())
	})
}

func tkGeneralizeRouter(group *gin.RouterGroup, h handler.TkGeneralizeHandler) {
	group.POST("/tkGeneralize", h.Create)
	group.DELETE("/tkGeneralize/:id", h.DeleteByID)
	group.POST("/tkGeneralize/delete/ids", h.DeleteByIDs)
	group.PUT("/tkGeneralize/:id", h.UpdateByID)
	group.GET("/tkGeneralize/:id", h.GetByID)
	group.POST("/tkGeneralize/list/ids", h.ListByIDs)
	group.POST("/tkGeneralize/list", h.List)
}
